package com.lou1052.redis.jedis.factorybean.cluster;

import com.lou1052.core.base.annotation.thread.ThreadSafe;
import com.lou1052.redis.jedis.ext.client.cluster.JedisClusterExt;
import com.lou1052.redis.jedis.factorybean.AbsJedisCommandsFactory;
import com.lou1052.redis.jedis.source.cluster.JedisClusterExtSource;
import com.lou1052.redis.jedis.source.cluster.JedisClusterSource;
import redis.clients.jedis.JedisCluster;

/**
 * 返回 JedisCluster 全局的 线程安全的
 */
@ThreadSafe
public class JedisClusterExtFactory extends AbsJedisCommandsFactory<JedisClusterExt,JedisClusterExtSource> {

	public JedisClusterExtFactory(JedisClusterExtSource jedisClusterSource) {
		super(jedisClusterSource);
	}

	@Override
	public JedisClusterExt getObject() throws Exception {
		JedisClusterExt jedisCluster = source.getSource();
		return jedisCluster;
	}

}
